<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<textarea id="asd">
    asdasd
</textarea>

<script>

    asd.addEventListener('keyup',e=>{
        console.log(e);

        if(e.keyCode === 38){
            console.log('');
        }
    })

</script>
</body>
</html>